package com.burgess.net.listener;

import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Spring支持消息监听
 * 创建人    BurgessLee
 * 创建时间   2020/5/21
 * 描述
 */
public class MyMessageListener implements MessageListener {

    public void onMessage(Message message) {
        TextMessage textMessage = (TextMessage) message;
        try {
            System.out.println("receive txt msg = " + textMessage.getText());
        }catch (Exception e){
            e.printStackTrace();
        }
    }

}
